using System;

namespace SeguradoraIA.Framework.Service
{
    public class MapRule<T, D>
    {
        public MapRule<T, D> Rule<T1, T2>(Func<T1, T2> func)
        {
            Translator.mappedRules.Add(new RuleMap()
                                           {
                                               Source = typeof(T),
                                               Target = typeof(D),
                                               PropertySource = typeof(T1),
                                               PropertyTarget = typeof(T2),
                                               DeclaredRuleMap = func
                                           });

            return new MapRule<T, D>();
        }
    }
}